package com.project.nimsen.web.pub.tag;

import java.io.IOException;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.project.nimsen.util.WebUtil;

import freemarker.core.Environment;
import freemarker.template.TemplateDirectiveBody;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;
/**
 * 直接返回网站的根路径
 * */
@Component("nimsen_weburl")
public class WebURLTag extends BaseTag {

	protected void exec(Environment env, Map params, TemplateModel[] loopVars,
			TemplateDirectiveBody body) throws TemplateException, IOException {
		outWrite(WebUtil.webUrl(request));
	}

}
